#!/bin/bash
tar -xvf fdk-aac-2.0.3.tar.gz


./configure \
--prefix=$sopath/$CPU/$API \
--enable-shared \
--disable-static \
--enable-example \
--enable-pic \
--disable-asm \
--disable-cli \
--host=arm-linux \
cc=$CC \
cxx=$CXX \
--with-sysroot=$SYSROOT \
CPPFLAGS="-fPIC"
make -j4
make install

rm -rf fdk-aac-2.0.3
tar -xvf fdk-aac-2.0.3.tar.gz
# h264 编译
cd fdk-aac-2.0.3
CPU=aarch64
CC="$NDK_BIN/$CPU-linux-android$API-clang"
CXX=$NDK_BIN/$CPU-linux-android$API-clang++
buildh264





./configure \
  --cross-prefix="$CROSS_PREFIX" \
  --sysroot="$NDK_SYSROOT" \
  --host="$HOST" \
  --enable-pic \
  --disable-asm \
  --enable-static \
  --disable-shared \
  --prefix="${TOOLCHAIN_PREFIX}" \
  --disable-cli




















rm -rvf nettle-3.6
tar -xvf nettle-3.6.tar.gz
cd nettle-3.6
# nettle 依赖
apt-get -y install m4
./configure --prefix=$MY_FFMPEG  --enable-shared --enable-mini-gmp --disable-static 
make -j4
make install
cd $pwds
rm -rvf nettle-3.6





 
# 步骤3: 设置环境变量
export ANDROID_ABI=arm-linux-androideabi # 或者其他你需要支持的ABI
export ANDROID_API=21 # 根据你的需求选择合适的API版本
export CFLAGS="-I$ANDROID_NDK/sysroot/usr/include/android $CFLAGS"
export CPPFLAGS="-I$ANDROID_NDK/sysroot/usr/include/android $CPPFLAGS"
export LDFLAGS="-L$ANDROID_NDK/sysroot/usr/lib/android/$ANDROID_API $LDFLAGS"
 
./configure 
--prefix=/usr 
--host=$ANDROID_ABI 
--build=x86_64-linux-gnu \
--disable-guile \
--disable-hardware-acceleration \
--disable-non-batch \
--enable-local-libopts \
--disable-c++ \    
--disable-fortify \
--disable-gcc-warnings \
--with-included-unistring 

make -j$(nproc)
make install DESTDIR=install




make -j$(nproc)
make install DESTDIR=install











